
function weatherReducer(preState = [], action = {}) {
    const { type, data } = action
    switch (type) {
        case 'saveWeather':
            console.log('保存天气信息到redux');
            preState = data
            return preState
        case 'getWeather':
            console.log('获取redux中的天气信息');
            return preState
        default:
            return preState
    }
}

export default weatherReducer